package com.tanhua.dubbo.api;

import com.tanhua.model.mongo.Movement;
import com.tanhua.model.vo.PageResult;

import java.util.List;

public interface MovementApi {
    //发布动态
    void publish(Movement movement);

    //根据用户id查询用户发布的动态数据
    PageResult findByUserId(Long userId, Integer page, Integer pagesize);

    //根据用户id查询好友动态
    List<Movement> findFriendMovements(Integer page, Integer pagesize, Long userId);

    //随机构造10条动态数据
    List<Movement> randomMovement(Integer pagesize);

    //根据PID数据查询动态数据
    List<Movement> findMovementsByPids(List<Long> pids);

    Movement findById(String movementId);

    //根据用户id查询
    PageResult findByUserId(Long uid, Integer state, Integer page, Integer pagesize);
}
